﻿using System;

namespace Class_Object
{
    class Student
    {
        private string name;
        private string id;
        private string department;
        private float cgpa;

        public void ShowInfo()
        {
            Console.WriteLine("Output : ");            
            Console.WriteLine("Name = " + this.name);
            Console.WriteLine("ID = " + this.id);
            Console.WriteLine("Department = " + this.department);
            Console.WriteLine("CGPA = " + this.cgpa);
        }

        public void SetValues()
        {
            Console.WriteLine("Student : ");
            Console.Write("Enter Name : ");
            this.name = Console.ReadLine();
            Console.Write("Enter ID : ");
            this.id = Console.ReadLine();
            Console.Write("Enter Department : ");
            this.department = Console.ReadLine();
            Console.Write("Enter CGPA : ");
            this.cgpa = Convert.ToSingle(Console.ReadLine());
        }
    }
}
